export default {
    data() {
        return {
            tableHeight: ''
        }
    },
    mounted() {
        // 监听窗口变化
        window.onresize = () => {
            this.tableHeight = this.getTableHeight();
        }
        // 初始化值
        this.tableHeight = this.getTableHeight();
    },
    methods: {
        // 获取表格自适应高度
        getTableHeight() {
            return window.innerHeight - this.$refs.table.$el.offsetTop - 130;
        }
    }
}